Higher Order Deforestation

نویسنده

  • Geoff W. Hamilton
چکیده

Deforestation is a well known transformation algorithm which can eliminate intermediate structures from functional programs. In previous work, we have shown how the deforestation algorithm can be extended to handle higher order programs. A higher order treeless form of expression was defined to ensure the termination of this algorithm. Our higher order algorithm was further extended by Seidl and Sørensen, and this extension was shown to remove some intermediate structures not removed by our algorithm (although our original algorithm can also remove some intermediate structures not removed by their technique). In this paper, we show how our original definition of higher order treeless form can be extended to allow the intermediate structures in the examples given by Seidl and Sørensen to be removed. We argue that, because our extended algorithm uses an easy to recognise treeless form, there is more transparency for the programmer in terms of the improvements which will be made. We prove that our new algorithm terminates, and we conjecture that it ensures that there is no efficiency loss, which we argue is essential for any optimisation.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Constraints to Stop Deforestation

Wadler's deforestation algorithm eliminates intermediate data structures from functional programs. To be suitable for inclusion in a compiler, deforestation must terminate on all programs. Several techniques exist to ensure termination of deforestation on all rst-order programs, but general techniques for higher-order programs were introduced only recently by rst Hamilton and then Marlow. We pr...

متن کامل

Deforestation for higher-order functional programs

Functional programming languages are an ideal medium for program optimisations based on source-to-source transformation techniques. Referential transparency affords opportunities for a wide range of correctness-preserving transformations leading to potent optimisation strategies. This thesis builds on deforestation, a program transformation technique due to Wadler that removes intermediate data...

متن کامل

Attribute Grammars and Functional Programming Deforestation

The functional programming community is paying increasing attention to static structure-based transformations. For example, generic control operators , such as fold, have been introduced in functional programming to increase the power and applicability of a particular kind of static transformation, called deforestation, which prevents the construction of useless intermediate data structures in ...

متن کامل

عوامل اقتصادی- اجتماعی مؤثر بر جنگل زدایی کشورهای منتخب: کاربرد نظریه زیست محیطی کوزنتس

Deforestation has been recognized as one of the biggest environmental problems in the world. It is also one of the main elements of land productivity changes and one of the biggest factors which threaten world's environmental diversity. In this study, based on environmental Kuznets theory, factors which may affect deforestation have been investigated. Results obtained from 71 studied countries ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1996